package com.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.dao.UserDao;
import com.model.User;
import com.service.UserService;

@Service("userservice")
@Transactional
public class UserServiceImpl implements UserService {
	
	@Resource private UserDao userdao;	

	public void add(User user) {
		userdao.add(user);
	}

	public void delete(String username) {
		userdao.delete(username);
	}

	public void change(User user,String username) {
		userdao.change(user,username);
	}

	public User find(String username) {
		return userdao.find(username);		
	}

	public List<User> list() {
		return userdao.list();
	}
	
}
